<template>
  <div class="row">
    <div class="login-container">
      <h1>{{ msg }}</h1>
      <div class="col-md-12">
        <form>
          <div class="form-group">
            <label>用户名</label>
            <input type="text" class="form-control" placeholder="用户名" v-model="eduUser.account">
          </div>
          <div class="form-group">
            <label>密码</label>
            <input type="password" class="form-control" placeholder="密码" v-model="eduUser.password">
          </div>
          <button type="button" class="btn btn-default" v-on:click="eduLogin">Submit</button>
        </form>
      </div>
    </div>
  </div>

</template>

<script>
  var exportData = {
    eduUser: {
      account: "cmy1",
      password: "111111"
    }, msg: "登录"
  };
  export default {
    name: 'hello',
    data () {
      return exportData
    },
    methods: {
      eduLogin: function () {
        jQuery.post("/school/login", this.eduUser, function (data) {
          data = data;
        })
      },
    }
  }
</script>

<style scope>
  .login-container {
    margin: 0 auto;
    width:500px;
  }
</style>
